{% extends "base.html" %}

{% block title %}Remitos{% endblock %}
{% block head %}Remitos de {{ cliente }}{% endblock %}

{% block content %}
    <table class="tablesorter" align="center" id="sorter_clientes" border="0" cellpadding="0" cellspacing="1" style="width:970px;">
        <thead>
            <tr>
                <th colspan="2">Remito</th>
                <th>Fecha</th>
                <th>Descripci&oacute;n</th>
                <th>Base</th>
                <th>Estado</th>
                {% if perms.gestion.change_remitos %}
                    <th colspan="2"></th>
                {% else %}
                    <th></th>
                {% endif %}
            </tr>
        </thead>
        <tbody>
            {% for obj in todo %}
                <tr>
                    <td style="width:15px;font-weight:bold;">{{ obj.remito.numeroRemito }}</td>
                    <td style="width:5px;font-weight:bold;">{{ obj.numeroLinea }}</td>
                    <td style="width:40px;">{{ obj.remito.fecha|date:"SHORT_DATE_FORMAT"|default_if_none:"" }}</td>
                    <td>{{ obj.descripcion|default_if_none:"" }}</td>
                    <td style="text-align:right;width:90px;">
                        <div class="montoIzq">U$S</div>
                        <div class="montoDer">{{ obj.base|floatformat:"2"|default_if_none:"" }}</div>
                    </td>
                    <td style="width:40px;">{{ obj.estado|default_if_none:"" }}</td>
                    {% if perms.gestion.change_remitos %}
                        <td class="right"><a href="/remitos/editar/items/{{ obj.id|cut:"." }}/">Editar</a></td>
                        <td class="right"><a href="/remitos/check/items/{{ obj.id|cut:"." }}/">Eliminar</a></td>
                    {% endif %}
                </tr>
            {% endfor %}
        </tbody>
    </table>
    <br /><br /><br /><br /><br /><br />
{% endblock %}